<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>通知</title>
</head>
<body>
<div id="notify">
    <table>
        <tr v-for="note in notifys">
            <td>{{note.context}}<td>
            <td>{{note.date}}<td>
        </tr>
    </table>
</div>
</body>
</html>

<script src="../js/ajax.js"></script>
<script src="../js/vue.js"></script>

<script>
    window.onload=function getData() {
        let user_name=window.localStorage.getItem("loginName");
        new Vue({
            el:"#notify",
            data(){
                return{
                   notifys:[]
                }
            },
            mounted(){
                let _this=this;
                ajax({
                    method: "post",
                    url: "../../comment",
                    data: {
                        userName:user_name,
                        code:4
                    },
                    success: function (result) {
                        console.log(result);
                        _this.notifys=result;
                    },
                    error:function (result){
                        console.log(result);
                    }
                })
            }
        })
    }
</script>